﻿@using SlamDunk.CMS.BLL
@{
    MasterScoreLineBll masterScoreLineBll = new MasterScoreLineBll();
    List<int> yearList = masterScoreLineBll.GetAllYear();
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@Model.Title</title>
    @Include("Head", Model)
    <script type="text/javascript" src="/Scripts/jquery.tmpl.js"></script>
    <script type="text/x-jquery-tmpl" id="trTemp">
        <tr>
            <td align="center">${Major}</td>
            <td align="center">${SumScore}</td>
            <td align="center">${PoliticsEnglish}</td>
            <td align="center">${BusiCompre}</td>
        </tr>
    </script>
    <script type="text/javascript" src="/Scripts/pageBar.js"></script>
    <script type="text/javascript">
        $(function () {
            //加载列表
            loadList(1);
        });
        //加载列表函数
        function loadList(pIndex) {
            //获取年份值
            var year = $('#txtYear').val();
            //请求数据
            $.post('/Admin/MasterScoreLine/SearchList', { 'pageIndex': pIndex, 'year': year, 'category': '2' }, function (jsonData) {
                if (jsonData.Status == '1') {
                    $('#tbScoreLine').empty();
                    makePageBar(loadList, document.getElementById('pageBar'), jsonData.Data.PageIndex, jsonData.Data.PageCount, 10, jsonData.Data.RowCount);
                    $('#trTemp').tmpl(jsonData.Data.Data).appendTo('#tbScoreLine');
                }
            }, 'json');
        }
        //为年份隐藏域赋值
        function seachYear(year) {
            //为年份隐藏域赋值
            $('#txtYear').val(year);
            loadList(1);
        }
    </script>
    <style type="text/css">
        #pageBar a {
            cursor: pointer;
            background: #0094ff;
            border: 1px solid #ccc;
            margin: 0 5px;
            padding: 0 4px;
            color: #fff;
            display: inline-block;
            text-align: center;
            text-decoration: none;
        }

            #pageBar a:hover {
                background: #e68917;
            }
    </style>
</head>
<body>
    @Include("Top", Model)
    @Include("SubBanner", Model)
    <div class="Sub_Middlecon">
        <div class="Sub_Middle">
            @Include("Left", Model)
            <div class="SubMid_R">
                <div class="SubMid_R1">
                    <span class="SubMid_R1title">历年分数线</span><span class="SubMid_R1tip"></span>
                    <span class="SubMid_R1path">网站首页：<a href="/">首页</a> - <span class="SubMid_R1current">历年分数线</span></span>
                </div>
                <div class="SubMid_R2">
                    <div class="SubMid_ScoreLinecon">
                        <div class="SubMid_ScoreLinecon0">
                            <span class="ScoreLinecon0_tip">学位：</span>
                            <ul class="ScoreLinecon0_txtcon">
                                <li><a href="/Html/ScoreLine/Index.html">本科分数线</a></li>
                                <li><a href="#" class="active">硕士分数线</a></li>
                            </ul>
                        </div>
                        <div class="SubMid_ScoreLineconMID">
                            <ul>
                                <li><a href="/Html/MasterScoreLine/Index_T.html">统招生学校复试基本线</a></li>
                                <li><a href="javascript:void(0);" class="active">联考生学校复试基本线</a></li>
                            </ul>
                        </div>
                        <div class="SubMid_ScoreLinecon1">
                            <span class="ScoreLinecon1_tip">年份：</span>
                            <input type="hidden" id="txtYear" value="" />
                            <ul class="ScoreLinecon1_txtcon">
                                @foreach (int year in yearList)
                                {
                                    <li><a href="javascript:void(0);" onclick="seachYear(@year);">@year</a></li>
                                }
                            </ul>
                        </div>
                        <div class="SubMid_ScoreLinecon3">
                            <table width="0" border="0" class="ScoreLinecon3_tb">
                                <thead>
                                    <tr class="tit">
                                        <td height="42">学科</td>
                                        <td>总分</td>
                                        <td>外语</td>
                                        <td>综合能力</td>
                                    </tr>
                                </thead>
                                <tbody id="tbScoreLine"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="SubMid_R3">
                    <div class="SubMid_R3con">
                        <div id="pageBar"></div>
                    </div>
                </div>
            </div>
            <div class="clear"></div>
        </div>
    </div>
    @Include("Foot", Model)
</body>
</html>